<template>
  <el-dialog
    title="提示"
    :visible.sync="transferDialogShow"
    width="50%"
    :before-close="handleClose"
  >
    <el-form
      :model="model"
      ref="ruleForm"
      label-width="auto"
      class="formItem"
      :label-position="labelPosition"
    >
      <el-form-item label="健康档案迁移方式" prop="resource">
        <el-radio-group v-model="model.resource">
          <el-radio
            label="为迁移人员建立新的家庭健康档案号"
            value="1"
          ></el-radio>
          <el-radio
            label="将迁移人员转移到现有家庭健康档案中"
            value="2"
          ></el-radio>
        </el-radio-group>
      </el-form-item>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="cancel">取 消</el-button>
      <el-button type="primary" @click="submit">确 定</el-button>
    </span>
  </el-dialog>
</template>

<script>
export default {
  props: {
    transferDialogShow: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      labelPosition: "top",
      model: {
        resource: ""
      }
    }
  },
  methods: {
    // 关闭
    handleClose() {
      this.$emit("update:transferDialogShow", false)
    },
    // 取消
    cancel() {
      this.handleClose()
    },
    // 保存
    submit() {
      this.handleClose()
    }
  }
}
</script>
<style lang="scss" scoped>
.formItem {
  /deep/ .el-form-item__content {
    width: 90%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
  }
}
</style>
